﻿<UserControl x:Class="Insteon.Mayhem.GlowingIcon"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="100">

    <UserControl.Resources>
        <Storyboard x:Key="Storyboard1" AutoReverse="True" RepeatBehavior="Forever">
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ellipse">
                <EasingColorKeyFrame KeyTime="0:0:1" Value="#FF0C600E">
                    <EasingColorKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseIn"/>
                    </EasingColorKeyFrame.EasingFunction>
                </EasingColorKeyFrame>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="ellipse">
                <EasingColorKeyFrame KeyTime="0" Value="sc#1, 0.246201321, 0.5149177, 0.246201321"/>
                <EasingColorKeyFrame KeyTime="0:0:1" Value="#FFC5DEC6">
                    <EasingColorKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseIn"/>
                    </EasingColorKeyFrame.EasingFunction>
                </EasingColorKeyFrame>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
        </EventTrigger>
    </UserControl.Triggers>

    <Viewbox x:Name="LayoutRoot" Stretch="Fill">
        <Grid Width="100" Height="100">
            <Ellipse x:Name="ellipse" Stroke="Black">
                <Ellipse.Fill>
                    <RadialGradientBrush>
                        <GradientStop Color="White" Offset="0"/>
                        <GradientStop Color="#FF0C600E" Offset="1"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
        </Grid>
    </Viewbox>

</UserControl>
